package blog;

import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.params.provider.Arguments;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

import java.util.stream.Stream;

public class InitEnd {
    public static WebDriver webDriver;

    @BeforeAll
    public static void SetUp() {
        webDriver = new ChromeDriver();
        System.out.println("setup...");
    }
    @AfterAll
    public static void TearDown() {
//        webDriver.quit();
        System.out.println("quit...");
    }
    public static Stream<Arguments> dataRight() {
        return Stream.of(Arguments.arguments("黑旋风", "123", "http://127.0.0.1:9580/index.html"));
    }

    public static Stream<Arguments> dataFailed() {
        return Stream.of(Arguments.arguments("黑旋风","123456", "http://127.0.0.1:9580/sign-in.html"));
    }

    public static Stream<Arguments> urlSignUp() {
        return Stream.of(Arguments.arguments( "http://127.0.0.1:9580/sign-in.html"));
    }

    public static Stream<Arguments> dataRegister() {
        return Stream.of(Arguments.arguments("呜呼呜呼呜呼", "123"));
    }
    public static Stream<Arguments> url() {
        return Stream.of(Arguments.arguments("http://127.0.0.1:9580/index.html"));
    }

    public static Stream<Arguments> titlePost() {
        return Stream.of(Arguments.arguments("C++相关知识"));
    }
}
